module.exports = {
  publicPath: "/",
  chainWebpack: config => {
    if (process.env.NODE_ENV === "production") {
      //生产包取消console debugger打印
      config.optimization.minimizer("terser").tap(args => {
        args[0].terserOptions.compress.drop_console = true;
        args[0].terserOptions.compress.drop_debugger = true;
        args[0].terserOptions.compress.pure_funcs = ["console.log"];
        args[0].terserOptions.output = {
          comments: false
        };
        return args;
      });
    }
  },

  devServer: {}
};
